From: pesader Date: Sun, 28 Apr 2024 20:40:59 +0000 (-0300) Subject: unlockDialog: Also center the time in 12h format X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~226^2^2~191 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ccdd46c0d9372d8587809eb11add08ee87200b67;p=gnome-shell.git unlockDialog: Also center the time in 12h format Since the time string uses a space to pad single-digit numbers, the centered label looks off-center. Fix this by applying the trim() function to get rid of whitespaces. The drawback of this approach is that the label will change position slightly when the time changes, but for the lockscreen that's okay. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6193 Part-of: --- diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index 15a3a984e..7b2ab8d38 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -366,7 +366,7 @@ class UnlockDialogClock extends St.BoxLayout { } _updateClock() { - this._time.text = this._wallClock.clock; + this._time.text = this._wallClock.clock.trim(); let date = new Date(); /* Translators: This is a time format for a date in